// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/utils/request'

/**
 * 商户 列表
 * @param pram
 */
export function merchantListApi(params) {
  return request({
    url: '/admin/merchant/list',
    method: 'get',
    params
  })
}

/**
 * 添加商户
 * @param {*} pram 
 * @returns 
 */
export function addMerchantApi(pram) {
    const data = {
      account: pram.account,
      merName: pram.merName,
      merPhone: pram.merPhone,
      pwd: pram.pwd,
      merAppId: pram.merAppId,
      merAppSecret: pram.merAppSecret,
      merFullName: pram.merFullName,
      merAddress: pram.merAddress,
      merKeywords: pram.merKeywords,
      status: pram.status
    }
    return request({
      url: '/admin/merchant/save',
      method: 'POST',
      data: data
    })
  }

